package the.broccoli.auth.aop;

import org.apache.shiro.aop.AnnotationResolver;
import org.apache.shiro.authz.aop.PermissionAnnotationMethodInterceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import the.broccoli.auth.converter.MultiPurposeAuthorizingObjectConverter;

public class PermissionAnnotationConvertableMethodInterceptor extends PermissionAnnotationMethodInterceptor {
    private static final Logger logger = LoggerFactory.getLogger(PermissionAnnotationConvertableMethodInterceptor.class);

    public PermissionAnnotationConvertableMethodInterceptor(AnnotationResolver annotationResolver, MultiPurposeAuthorizingObjectConverter multiPurposeAuthorizingObjectConverter) {
        this.setResolver(annotationResolver);
        this.setHandler(new PermissionAnnotationConvertableHandler(multiPurposeAuthorizingObjectConverter));
    }
}
